package com.bing.habit.service.impl;

import com.bing.habit.mapper.UserDAO;
import com.bing.habit.entity.User;
import com.bing.habit.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDAO userDAO;

    public User findByOpenid(String openid) {
        return userDAO.findByOpenid(openid);
    }

    public void addOrUpdata(User user) {
        userDAO.insert(user);
    }
}

